<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <!-- user-scalable = no 禁止拖动 -->
  <meta name="viewport" content="width=device-width, user-scalable = no">
  <title>touch事件</title>
  <style>
    #box{
      width: 260px;
      height: 260px;
      background: red;
    }
  </style>
</head>
<body>
  <div id="box"></div>
  <script>
    {
      let box = document.querySelector('#box');

      /**
      *          类似于
      *touchstart --> mousedown
      *touchmove --> mousemove
      *touchend --> mouseup
      */

      box.addEventListener('mousedown', () => {
        console.log('手指触碰');
      });

      box.addEventListener('mousemove', () => {
        console.log('手指移动');
      });

      box.addEventListener('mouseup', () => {
        console.log('手指抬起');
      });
    }
  </script>
</body>
</html>